<template>
    <div class="page">
        <div>
            <p style="display:block;margin-top:5px;">
                <van-botton class="btn" type="paimary" @click="Dialog">退出登录</van-botton>
            </p>
            </p><p style="display:block;margin-top:5px;">
                <van-botton class="btn" type="paimary" @click="Dialog2">娱乐一下</van-botton>
            </p>
        </div>
    </div>
</template>
<script>
export default{
    data(){
    return{
        msg:''
        }
    },
    methods:{
        Dialog(){
            this.$dialog.confirm({
                title:'',
                message:'确认退出登陆吗',
                confirmButtonColor:'red'
            }).then(()=>{
                console.log('点击了确认')
                this.$router.push('/login');
            }).catch(()=>{
                console.log('点击了取消')
            })
        },
        Dialog2(){
            this.$dialog.confirm({
                title:'',
                message:'点击确认开始',
                confirmButtonColor:'red'
            }).then(()=>{
                console.log('点击了确认')
                this.$router.push('/about');
            }).catch(()=>{
                console.log('点击了取消')
            })
        }
    }
}
</script>
<style scoped>
.btn{
    margin: 20px;
}
</style>